<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ListMenuWidget
 *
 * @author anhducbkhn
 */
class ListMenuWidget extends CWidget {

    //put your code here

    public function init() {
        $crite = new CDbCriteria();
        $crite->order = 'order_by ASC';
        $crite->with = 'parent';
        $model = Categrory::model()->findAll($crite);

        if ($model != Null) {

            $this->render('menu', array(
                'model' => $model,
                    )
            );
        }
    }

}

?>
